//
//  ShopListCell.swift
//  WineComing
//
//  Created by xiaozhi on 15/7/26.
//  Copyright (c) 2015年 xiaozhi. All rights reserved.
//

import UIKit

class ShopListCell: UITableViewCell {
    @IBOutlet var cell1:UIView!
    @IBOutlet var cell2:UIView!
    @IBOutlet var imageView1:XZImageView!
    @IBOutlet var lbl00:UILabel!
    @IBOutlet var btn1:UIButton!
    
    @IBOutlet var imageView2:XZImageView!
    @IBOutlet var lbl10:UILabel!
    @IBOutlet var btn2:UIButton!
    var indexPath:NSIndexPath?
    var btnHandle:((NSIndexPath?,NSInteger)->Void)?
    @IBAction func btn1Click(button:UIButton)->Void{
        if let path = indexPath{
            btnHandle?(path,0)
        }
    }
    @IBAction func btn2Click(button:UIButton)->Void{
        if let path = indexPath{
            btnHandle?(path,1)
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        contentView.backgroundColor = UIColor(red: 239/255.0, green: 239/255.0, blue: 239/255.0, alpha: 1.0)
        cell1.layer.cornerRadius = 3.0
        cell2.layer.cornerRadius = 3.0

    }

    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    override func prepareForReuse() {
        super.prepareForReuse()
        cell2.hidden = false
    }
    func displayOneCell(){
        cell2.hidden = true
    }
}
